import service from '@/utils/request'
import { useUserStore } from '@/stores/user'

export const login = (data: any) => {
  return service.post('/api/login', data)
}
export const getUserInfo = () => {
  return service.get('/api/user/info')
}

export const getMenuList = () => {
  return service.post('/api/menu/routes', { token: useUserStore().token })
}

export const getTableData = () => {
  return service.get('/api/table/data')
}
